package com.basic.business.upDate.domain;

import java.util.Date;

import cn.idev.excel.annotation.ExcelIgnoreUnannotated;
import cn.idev.excel.annotation.ExcelProperty;
import com.basic.common.annotation.Excel;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.basic.common.core.domain.BaseEntity;
import lombok.Getter;
import lombok.Setter;
import com.basic.common.utils.StringUtils;
import com.basic.common.utils.uuid.ULID;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * 商品上新日期管理对象 t_goods_up_date
 *
 * @author zhaoxy_jn@163.com
 * @date 2025-06-05
 */
@Getter
@Setter
@ExcelIgnoreUnannotated
public class TGoodsUpDate extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** id */
    @Excel(name = "商品ID")
    private String id;

    /** 上新日期 */
    @Excel(name = "上新日期")
    @ExcelProperty(value = "上新日期")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date upNewDate;

    /** 状态 正常：NORMAL 删除：DELETED 锁定：LOCKED */
    @ExcelProperty(value = "状态 正常：NORMAL 删除：DELETED 锁定：LOCKED")
    private String status;

    public void setId(String id) {
        this.id = StringUtils.isNotEmpty(id) ? id : ULID.getId();
    }
}
